/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package proj5labbd;

import javax.swing.UnsupportedLookAndFeelException;
import proj5labbd.graphics.MainFrame;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.UIManager;

/*
 * Fluxo principal do aplicativo
 */
public class Main {

    public static void main(String[] args) {
        MainFrame app = null;
        //Tenta utilizar o lookandfeel Nimbus, caso este não esteja instalado, 
        //utiliza o design padrão
        try {
            // TODO code application logic here
            UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
            app = new MainFrame();
            app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            app.setVisible(true);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            if (app == null) {
                app = new MainFrame();
                app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                app.setVisible(true);
            }
        }
    }

}
